ThinkPHP5


think\Paginator
library\think\Paginator.php at line 17

Class Paginator

Paginator
All Known Subclasses:
think\paginator\driver\Bootstrap

public abstract class Paginator


Constructor Summary
protected void

__construct(mixed items, mixed listRows, mixed currentPage, mixed total, bool simple, mixed options)

Method Summary
static PaginatorCollection

make(null currentPage, bool simple, null total, array options, mixed items, mixed listRows)

protected static void

setCurrentPage(mixed currentPage)

protected string

url($page page)

获取页码对应的链接

static int

getCurrentPage(string varPage, int default)

自动获取当前页码

static string

getCurrentPath()

自动获取当前的path

void

total()

void

listRows()

void

currentPage()

void

lastPage()

boolean

hasPages()

数据是否足够分页

array

getUrlRange(int start, int end)

创建一组分页链接

$this

fragment(string|null fragment)

设置URL锚点

$this

appends(array|string key, string|null value)

添加URL参数

protected string

buildFragment()

构造锚点字符串

abstract mixed

render()

渲染分页html

Constructor Detail

library\think\Paginator.php at line 43

__construct

protected void __construct(mixed items, mixed listRows, mixed currentPage, mixed total, bool simple, mixed options)

Method Detail

library\think\Paginator.php at line 78

make

public static PaginatorCollection make(null currentPage, bool simple, null total, array options, mixed items, mixed listRows)


library\think\Paginator.php at line 84

setCurrentPage

protected static void setCurrentPage(mixed currentPage)

library\think\Paginator.php at line 99

url

protected string url($page page)

获取页码对应的链接


library\think\Paginator.php at line 128

getCurrentPage

public static int getCurrentPage(string varPage, int default)

自动获取当前页码


library\think\Paginator.php at line 143

getCurrentPath

public static string getCurrentPath()

自动获取当前的path


library\think\Paginator.php at line 148

total

public void total()

library\think\Paginator.php at line 156

listRows

public void listRows()

library\think\Paginator.php at line 161

currentPage

public void currentPage()

library\think\Paginator.php at line 166

lastPage

public void lastPage()

library\think\Paginator.php at line 178

hasPages

public boolean hasPages()

数据是否足够分页


library\think\Paginator.php at line 190

getUrlRange

public array getUrlRange(int start, int end)

创建一组分页链接


library\think\Paginator.php at line 207

fragment

public $this fragment(string|null fragment)

设置URL锚点


library\think\Paginator.php at line 220

appends

public $this appends(array|string key, string|null value)

添加URL参数


library\think\Paginator.php at line 243

buildFragment

protected string buildFragment()

构造锚点字符串


library\think\Paginator.php at line 252

render

public abstract mixed render()

渲染分页html


ThinkPHP5